package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.interactive.InteractiveRecord;
import com.yanqu.road.entity.interactive.UserInteractive;

import java.util.LinkedList;

public class UserInteractiveBussiness {

    public static UserInteractive getUserInteractive(long userId) {
        return DaoHelper.getUserInteractiveDaoImpl().getUserInteractive(userId);
    }

    public static boolean addUserInteractive(UserInteractive userInteractive) {
        return DaoHelper.getUserInteractiveDaoImpl().add(userInteractive);
    }

    public static boolean updateUserInteractive(UserInteractive userInteractive) {
        return DaoHelper.getUserInteractiveDaoImpl().update(userInteractive);
    }

    public static LinkedList<InteractiveRecord> getInteractiveRecordList(long userId, int maxCount) {
        return DaoHelper.getInteractiveRecordDaoImpl().getInteractiveRecordList(userId, maxCount);
    }

    public static boolean addInteractiveRecord(InteractiveRecord interactiveRecord) {
        return DaoHelper.getInteractiveRecordDaoImpl().add(interactiveRecord);
    }

    public static boolean updateInteractiveRecord(InteractiveRecord interactiveRecord) {
        return DaoHelper.getInteractiveRecordDaoImpl().update(interactiveRecord);
    }
}
